package com.usf.jprovider.object.type;

import java.text.DecimalFormat;


public class JDouble extends JType<Double> {
	
	public JDouble() {
		super();
		value = 0.;
	}
	
	public JDouble(Double value, String format) {
		super(value, format);
	}

	public JDouble(String value, String format) throws Exception {
		super(value, format);
	}

	@Override
	protected Double parse(String value, String format) {
		return Double.parseDouble(value.replace(",", "."));
	}
	@Override
	protected String format(String format) {
		return new DecimalFormat(format).format(value).replace(",", ".");
	}
}
